package back.filter;
import java.io.IOException;

import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.annotation.WebFilter;

import common.servlet.BaseServlet;

@WebFilter(urlPatterns = "/*")
public class Filter01CharacterEncoding extends BaseServlet implements Filter
{

	@Override
	public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
			throws IOException, ServletException
	{
		System.out.println("==Filter01CharacterEncoding==");
		/*为每一个文件执行请求后,过滤*/
		request.setCharacterEncoding("Utf-8");
		chain.doFilter(request, response);
	}
	
}
